<template>
	<div class="app">
		<h2>我是App组件（父组件）</h2>
		<h3>School组件（子组件）给我的学校名是：{{xuexiaoMing}}</h3>
		<hr>
		<School :getName="getName"/>
	</div>
</template>

<script>
	import School from './components/School'
	export default {
		name:'App',
		components:{School},
		data() {
			return {
				xuexiaoMing:''
			}
		},
		methods: {
			getName(ming){
				console.log('@@',ming)
				this.xuexiaoMing = ming
			}
		},
	}
</script>

<style>
	.app{
		background-color: gray;
		padding: 20px;
	}
</style>